package com.fire.control.system.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;

import com.fire.control.system.entity.Company;
import com.fire.control.system.entity.Role;
import com.fire.control.system.entity.User;

/**
 * @author liuxincheng
 * @ClassName: UserDTO
 * @Description: TODO(用户返回DTO)
 * @date 2017年5月11日 上午9:59:46
 */
public class UserDTO implements Serializable{

	private static final long serialVersionUID = 3511375756008438072L;

	private String userId;
	
	private String loginName;
	
	private String password;
	
	private String name;
	
	private String telNumber;
	
	private String email;
	
	private String address;
	
	private String userCode;
	
	private String userIcon;
	
	private Boolean status;
	
	private Boolean enable;
	
	private Boolean changePwd;
	
	private Date updateTime;
	
	private Date createTime;
	
	private Company company;
	
	private Role role;
	
	private String userType;
	
	private List<ResourceDTO> resourceList = new ArrayList<ResourceDTO>();
	
	private Collection<DeviceGroupDTO> deviceGroupDTO;
	
	private Collection<Role> roleList;
	
	
	public List<ResourceDTO> getResourceList() {
		return resourceList;
	}

	public void setResourceList(List<ResourceDTO> resourceList) {
		this.resourceList = resourceList;
	}

	public String getUserIcon() {
		return userIcon;
	}

	public void setUserIcon(String userIcon) {
		this.userIcon = userIcon;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTelNumber() {
		return telNumber;
	}

	public void setTelNumber(String telNumber) {
		this.telNumber = telNumber;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
	public void setUser(User user){
		this.userId = user.getId();
		this.address = user.getAddress();
		this.email = user.getEmail();
		this.loginName = user.getLoginName();
		this.name = user.getName();
		this.password = user.getPassword();
		this.telNumber = user.getTelNumber();
		this.userType = user.getUserType();
		this.status = user.getStatus();
		this.changePwd = user.isChangePwd();
		this.userIcon = user.getUserIcon();
		this.company = user.getCompany();
		this.updateTime = user.getUpdateTime();
		this.createTime = user.getCreateTime();
		this.enable = user.isEnable();
	}


	/*public User getUserByUserDTO(UserDTO userDTO){
		User u = new User();
		u.setAddress(userDTO.getAddress());
		u.setChangePwd(userDTO.getChangePwd());
		u.setCompany(userDTO.getCompany());
		//u.setCreateTime(userDTO.GETC);
		u.setDeviceGroups(userDTO.GETD);
		return u;
	}*/
	public Collection<DeviceGroupDTO> getDeviceGroupDTO() {
		return deviceGroupDTO;
	}

	public void setDeviceGroupDTO(Collection<DeviceGroupDTO> deviceGroupDTO) {
		this.deviceGroupDTO = deviceGroupDTO;
	}

	public String getUserId() {
		return userId;
	}


	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	public Boolean getChangePwd() {
		return changePwd;
	}

	public void setChangePwd(Boolean changePwd) {
		this.changePwd = changePwd;
	}

	public Collection<Role> getRoleList() {
		return roleList;
	}

	public void setRoleList(Collection<Role> roleList) {
		this.roleList = roleList;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Boolean getEnable() {
		return enable;
	}

	public void setEnable(Boolean enable) {
		this.enable = enable;
	}


}
